import request from '@/utils/request'

// 查询项目指标设置列表
export function listDealIndicatorsSetting(query) {
  return request({
    url: '/setting/dealIndicatorsSetting/list',
    method: 'get',
    params: query
  })
}

// 查询项目指标设置详细
export function getDealIndicatorsSetting(id) {
  return request({
    url: '/setting/dealIndicatorsSetting/' + id,
    method: 'get'
  })
}

// 保存项目指标设置
export function saveDealIndicatorsSetting(data) {
  return request({
    url: '/setting/dealIndicatorsSetting/save',
    method: 'post',
    data: data
  })
}

// 删除项目指标设置
export function delDealIndicatorsSetting(id) {
  return request({
    url: '/setting/dealIndicatorsSetting/' + id,
    method: 'delete'
  })
}

// 导出项目指标设置
export function exportDealIndicatorsSetting(query) {
  return request({
    url: '/setting/dealIndicatorsSetting/export',
    method: 'get',
    params: query
  })
}

// 校验companyId是否已存在
export function checkRepeatCompany(companyId) {
  return request({
    url: '/setting/dealIndicatorsSetting/checkRepeatCompany/' + companyId,
    method: 'get'
  })
}

// 根据公司ID获取项目指标信息
export function getByCompanyId(companyId) {
  return request({
    url: '/setting/dealIndicatorsSetting/getByCompanyId/' + companyId,
    method: 'get'
  })
}
